Skip to content

Conversation

@pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Oct 31, 2025

#132977 introduced an allow-list of targets supporting file locking, but forgot to add illumos to it (which introduced support for it in ~2015). File::lock and friends are now stable, and the ecosystem is slowly replacing custom libc calls with the standard library. Crucially, in 1.91 both Cargo and bootstrap switched to File::lock, both breaking build directory locking.

This PR enables file locking on illumos. Fixes #146312.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 31, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@pietroalbini
Copy link
Member Author

r? @tgross35

Currently testing this on my illumos VM, will report back once the tests pass.

@rustbot rustbot assigned tgross35 and unassigned Mark-Simulacrum Oct 31, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 31, 2025

tgross35 is currently at their maximum review capacity.
They may take a while to respond.

@pietroalbini
Copy link
Member Author

Ran the tests locally, I can confirm the changes work.

@ChrisDenton
Copy link
Member

This looks right to me and your tests pass so r=me if CI is happy.

@pietroalbini

This comment was marked as outdated.

rust-bors bot added a commit that referenced this pull request Oct 31, 2025
Enable file locking support in illumos
@rust-bors

This comment has been minimized.

@rust-bors

This comment was marked as outdated.

@pietroalbini

This comment was marked as outdated.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 31, 2025
Enable file locking support in illumos

try-job: arm-android
@RalfJung
Copy link
Member

I figured we'd land Illumos first since as you said it is tier-2-with-host-tools so cargo has battle-tested this in the past. Then we can separately discuss what to do on Android. I pinged the target maintainers in #148325.

@pietroalbini

This comment was marked as outdated.

@RalfJung

This comment was marked as outdated.

@pietroalbini

This comment was marked as outdated.

@rust-bors

This comment was marked as outdated.

@pietroalbini
Copy link
Member Author

Ok, on second thought, let's just focus this PR on the illumos changes.

@bors r=ChrisDenton

@bors
Copy link
Collaborator

bors commented Oct 31, 2025

📌 Commit 3d9c69b has been approved by ChrisDenton

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 31, 2025
bors added a commit that referenced this pull request Oct 31, 2025
Rollup of 9 pull requests

Successful merges:

 - #139310 (add first HelenOS compilation targets)
 - #147161 (implement VecDeque extend_from_within and prepend_from_within)
 - #147622 (`unicode_data` refactors)
 - #147780 (Implement VecDeque::extract_if)
 - #147942 (Enable regression labeling aliases)
 - #147986 (Use fstatat() in DirEntry::metadata on Apple platforms)
 - #148103 (cg_llvm: Pass `debuginfo_compression` through FFI as an enum)
 - #148319 (docs: Fix argument names for `carrying_mul_add`)
 - #148322 (Enable file locking support in illumos)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 1, 2025
…ChrisDenton

Enable file locking support in illumos

rust-lang#132977 introduced an allow-list of targets supporting file locking, but forgot to add illumos to it (which introduced support for it in ~2015). `File::lock` and friends are now stable, and the ecosystem is slowly replacing custom libc calls with the standard library. Crucially, in 1.91 both Cargo and bootstrap switched to `File::lock`, both breaking build directory locking.

This PR enables file locking on illumos. Fixes rust-lang#146312.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 1, 2025
…ChrisDenton

Enable file locking support in illumos

rust-lang#132977 introduced an allow-list of targets supporting file locking, but forgot to add illumos to it (which introduced support for it in ~2015). `File::lock` and friends are now stable, and the ecosystem is slowly replacing custom libc calls with the standard library. Crucially, in 1.91 both Cargo and bootstrap switched to `File::lock`, both breaking build directory locking.

This PR enables file locking on illumos. Fixes rust-lang#146312.
bors added a commit that referenced this pull request Nov 1, 2025
Rollup of 9 pull requests

Successful merges:

 - #139310 (add first HelenOS compilation targets)
 - #147161 (implement VecDeque extend_from_within and prepend_from_within)
 - #147622 (`unicode_data` refactors)
 - #147780 (Implement VecDeque::extract_if)
 - #147942 (Enable regression labeling aliases)
 - #147986 (Use fstatat() in DirEntry::metadata on Apple platforms)
 - #148103 (cg_llvm: Pass `debuginfo_compression` through FFI as an enum)
 - #148319 (docs: Fix argument names for `carrying_mul_add`)
 - #148322 (Enable file locking support in illumos)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit eaa283d into rust-lang:master Nov 1, 2025
11 checks passed
rust-timer added a commit that referenced this pull request Nov 1, 2025
Rollup merge of #148322 - oxidecomputer:ea-flock-illumos, r=ChrisDenton

Enable file locking support in illumos

#132977 introduced an allow-list of targets supporting file locking, but forgot to add illumos to it (which introduced support for it in ~2015). `File::lock` and friends are now stable, and the ecosystem is slowly replacing custom libc calls with the standard library. Crucially, in 1.91 both Cargo and bootstrap switched to `File::lock`, both breaking build directory locking.

This PR enables file locking on illumos. Fixes #146312.
@rustbot rustbot added this to the 1.93.0 milestone Nov 1, 2025
@pietroalbini pietroalbini deleted the ea-flock-illumos branch November 1, 2025 10:43
@Amanieu Amanieu added beta-accepted Accepted for backporting to the compiler in the beta channel. stable-accepted Accepted for backporting to the compiler in the stable channel. labels Nov 5, 2025
@Amanieu
Copy link
Member

Amanieu commented Nov 5, 2025

Backport accepted.

@cuviper cuviper mentioned this pull request Nov 6, 2025
@cuviper cuviper modified the milestones: 1.93.0, 1.92.0 Nov 6, 2025
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 6, 2025
bors added a commit that referenced this pull request Nov 6, 2025
[stable] Prepare Rust 1.91.1

This PR prepares the artifacts for Rust 1.91.1, targeting next Monday with the following backports:

* #148322
* #148363

cc `@rust-lang/release`
bors added a commit that referenced this pull request Nov 7, 2025
[stable] Prepare Rust 1.91.1

This PR prepares the artifacts for Rust 1.91.1, targeting next Monday with the following backports:

* #148322
* #148363

cc `@rust-lang/release`
bors added a commit that referenced this pull request Nov 7, 2025
[stable] Prepare Rust 1.91.1

This PR prepares the artifacts for Rust 1.91.1, targeting next Monday with the following backports:

* #148322
* #148363

cc `@rust-lang/release`
bors added a commit that referenced this pull request Nov 7, 2025
[beta] backports

- Enable file locking support in illumos #148322
- Fix `wasm_import_module` attribute cross-crate #148363

r? cuviper
@cuviper cuviper modified the milestones: 1.92.0, 1.91.1 Nov 7, 2025
@cuviper cuviper removed the stable-nominated Nominated for backporting to the compiler in the stable channel. label Nov 7, 2025
bors added a commit that referenced this pull request Nov 9, 2025
[beta] backports

- Enable file locking support in illumos #148322
- Fix `wasm_import_module` attribute cross-crate #148363

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. stable-accepted Accepted for backporting to the compiler in the stable channel. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No flock support on Illumos in std even though it is available on Illumos

9 participants